package org.example.spring6.service;

import org.example.spring6.dao.UserDao;

/**
 * @auther hewenhui
 * @see <a href="hetp://www.codingmaster.com> java </a>
 */
public class UserService {
    UserDao userDao;
    int a;
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
        System.out.println("调用setUserDao方法完成依赖注入");
    }

    public void setA(int a) {
        this.a = a;
    }

    @Override
    public String toString() {
        return "UserService{" +
                "userDao=" + userDao +
                ", a=" + a +
                '}';
    }

    public void save(){
        System.out.println("保存用户信息！");
    }
}
